package com.tucue.dao;

import com.tucue.model.ServiceProvider;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

public interface ServiceProviderMapper {
    int deleteByPrimaryKey(Integer serviceproviderid);

    int insert(ServiceProvider record);

    int insertSelective(ServiceProvider record);

    ServiceProvider selectByPrimaryKey(Integer serviceproviderid);

    List<ServiceProvider> selectAll();

    /*通用服务产品 的查询 联合三张表*/
    List<Map<String,String>> selectAllGeneralProducts();

    /*贷款服务产品 的查询 联合三张表*/
    List<Map<String,String>> selectAllLoanProducts();

    /*投资服务产品 的查询 联合三张表*/
    List<Map<String,String>> selectAllInvestProducts ();

    //<!-- 更新服务提供商 -->
    int updateServiceProvider(ServiceProvider record);

    int updateByPrimaryKey(ServiceProvider record);

    //单个删除服务商
    int deleteServiceProvider(@Param(value = "id") int id, @Param(value = "visible") int visible);

    //批量删除服务商
    int deleteServiceProviderBatch(@Param(value = "idlist") List<Integer> idlist, @Param(value = "visible") int visible);

    //批量修改服务商状态
    int updateServiceProviderStatusBatch(@Param(value = "idlist") List<Integer> idlist, @Param(value = "status") int status);
}